package com.atguigu.template.improve;

public abstract class SoyMilk {
    protected final void make() {
        select();
        if (customerWantCondiments()) {
            addCondiments();
        }
        soak();
        beat();
    }

    protected void select() {
        System.out.println("第一步:选择好的新鲜黄豆");
    }

    protected abstract void addCondiments();

    protected void soak() {
        System.out.println("第三步:黄豆和配料开始浸泡，需要3小时");
    }

    protected void beat() {
        System.out.println("第四步:黄豆和配料放到豆浆机去打碎");
    }

    protected boolean customerWantCondiments() {
        return true;
    }
}
